package com.lmk.ms.common.dto.auth;

import com.lmk.ms.common.constants.SmsAction;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
@Schema(description = "短信发送参数")
public class SmsCodeParameter {
    @Schema(description = "验证类型：UMS_REGISTER, UMS_LOGIN, UMS_BIND")
    private String action;

    @Schema(description = "手机号码")
    private String mobile;

    @Schema(description = "验证码")
    private String code;

    @NotNull
    @NotBlank(message = "appId不可以为空")
    @Schema(description = "应用ID")
    protected String appId;


    public SmsCodeParameter() {
    }

    public SmsCodeParameter(SmsAction action, String mobile, String code) {
        this.action = action.toString();
        this.mobile = mobile;
        this.code = code;
    }
}
